package com.rc.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class ActivityTableDef extends TableDef {

    /**
     * 活动表 实体类。

 @author 27806
 @since 2024-06-16
     */
    public static final ActivityTableDef ACTIVITY = new ActivityTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn IMGS = new QueryColumn(this, "imgs");

    public final QueryColumn PRICE = new QueryColumn(this, "price");

    /**
     * 评分
     */
    public final QueryColumn SCORE = new QueryColumn(this, "score");

    /**
     * 库存
     */
    public final QueryColumn STOCK = new QueryColumn(this, "stock");

    public final QueryColumn TITLE = new QueryColumn(this, "title");

    /**
     * 活动园区
     */
    public final QueryColumn AREA_ID = new QueryColumn(this, "area_id");

    public final QueryColumn FARM_ID = new QueryColumn(this, "farm_id");

    /**
     * 活动主要内容
     */
    public final QueryColumn CONTENT = new QueryColumn(this, "content");

    /**
     * 结束时间
     */
    public final QueryColumn END_TIME = new QueryColumn(this, "end_time");

    /**
     * 开始时间
     */
    public final QueryColumn BEGIN_TIME = new QueryColumn(this, "begin_time");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    public final QueryColumn CREATE_USER = new QueryColumn(this, "create_user");

    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    public final QueryColumn UPDATE_USER = new QueryColumn(this, "update_user");

    public final QueryColumn DESCRIPTION = new QueryColumn(this, "description");

    /**
     * 推荐人数
     */
    public final QueryColumn RECOMMENDED = new QueryColumn(this, "recommended");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, IMGS, PRICE, SCORE, STOCK, TITLE, AREA_ID, FARM_ID, CONTENT, END_TIME, BEGIN_TIME, CREATE_TIME, CREATE_USER, UPDATE_TIME, UPDATE_USER, DESCRIPTION, RECOMMENDED};

    public ActivityTableDef() {
        super("rc", "activity");
    }

    private ActivityTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public ActivityTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new ActivityTableDef("rc", "activity", alias));
    }

}
